﻿using System.Collections;
using JUtil.CodeGenerator;
namespace CodeGenerator
{
    public class SqlFile : CodeGenBase
    {
        #region PrivateFields
        readonly RelatedSql RelatedSql;
        #endregion

        #region Constructors
        public SqlFile(RelatedSql RelatedSql)
        {
            this.RelatedSql = RelatedSql;
        }
        #endregion

        #region OverrideMethods
        
        protected override void AssignExportTemplate(Hashtable Variables)
        {
            Variables["GetOrderBy"] = RelatedSql.GetOrderBy;
            Variables["GetSelectSQLNoOrderBy"] = RelatedSql.GetSelectSQLNoOrderBy;
            Variables["GetSelectDetailsVwSQL"] = RelatedSql.GetSelectDetailsVwSQL;
            Variables["GetInsertSQL"] = RelatedSql.GetInsertSQL;
            Variables["GetUpdateSQL"] = RelatedSql.GetUpdateSQL;
            Variables["GetDeleteSQL"] = RelatedSql.GetDeleteSQL;
        }

        protected override string GetExportTemplate()
        {
            return GetTemplate();
        }

        #endregion


    } // end of SqlFile
}
